<?php
/**
 * Sidebar of tournaments
 *
 * @uses $vars['entity'] The content string for the main column
 */

$tournament = isset($vars['entity']) ? $vars['entity'] : false;

if(!$tournament) //This sidebar is shared with view, edit & add
{
	$tournament = new Tournament();
	$tournament->subtype = 7;
}
else
{
	$org = $tournament->getOrganization();
}
?>

<div class="elgg-image-block">
	<div class="elgg-image">
		<div>
			<a href="<?php echo $tournament->getUrl(); ?>">
				<?php echo elgg_view_entity_icon($tournament, 'large', array('href' => $tournament->getUrl())); ?>
			</a>
		</div>
	</div>
</div>